import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import * as path from 'path';

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
      Pages: path.resolve(__dirname, 'src/pages'),
      Type: path.resolve(__dirname, 'src/type'),
      Components: path.resolve(__dirname, 'src/components'),
      Api: path.resolve(__dirname, 'src/api'),
    },
  },
  server: {
    port: 8080,
    // 自定义端口
    host: '0.0.0.0',
    open: true,
    // 自动打开浏览器
    proxy: {},
  },
});
